package com.huawei.appgallery.search.ui.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.search.ui.card.HotWordBaseCard;
import java.util.ArrayList;
import o.azb;
import o.cgz;
import o.cht;
import o.chy;
import o.cih;
import o.cuv.e;

public class HotWordBaseNode extends cht {
    public HotWordBaseNode(Context context) {
        super(context, 1);
    }

    public int ˏ() {
        return 1;
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        View inflate = from.inflate(e.ॱˊ, null);
        azb.ˏ(inflate);
        ˋ(from, inflate);
        cih ˏ = ˏ(this.ॱ);
        ˏ.ˏ(inflate);
        ˊ(ˏ);
        viewGroup.addView(inflate, layoutParams);
        return true;
    }

    public void ˋ(chy o_chy) {
        super.ˋ(o_chy);
        int i = 0;
        while (i < ˊॱ() && (ˎ(i) instanceof HotWordBaseCard)) {
            HotWordBaseCard hotWordBaseCard = (HotWordBaseCard) ˎ(i);
            if (hotWordBaseCard != null) {
                hotWordBaseCard.ॱ(o_chy);
            }
            i++;
        }
    }

    public boolean ॱ() {
        return true;
    }

    public boolean ʽ() {
        return true;
    }

    public ArrayList<String> z_() {
        cgz ˊ = ˊ(0);
        if (ˊ instanceof HotWordBaseCard) {
            return ((HotWordBaseCard) ˊ).ˊ();
        }
        return null;
    }

    protected HotWordBaseCard ˏ(Context context) {
        return new HotWordBaseCard(context);
    }

    protected void ˋ(LayoutInflater layoutInflater, View view) {
    }
}
